<!DOCTYPE html>
<!-- saved from url=(0033)https://www.freees.cn/add_article -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="博客,论坛,社区,个人博客,技术社区,技术论坛,开源博客,开源社区,开源论坛">
  <meta name="description" content="博客,论坛,社区,个人博客,技术社区,技术论坛,开源博客,开源社区,开源论坛">

  <meta name="csrf-token" content="AtxKmVdmxwhlfUZ6v9lfN8VQGZdWJd8dTBHHgYoM">
  <title>Free社区</title>
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" href="./fabiao_files/layui.css">
  <link rel="stylesheet" href="./fabiao_files/global.css">
  <script src="./fabiao_files/push.js.下载"></script><script src="./fabiao_files/hm.js.下载"></script><script src="./fabiao_files/layui.js.下载"></script>
  <script src="./fabiao_files/jquery.min.js.下载"></script>
  <script src="./fabiao_files/common.js.下载"></script>
  <script type="text/javascript">


    
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?57c0470fa39f9e617c2771d0d95c3758";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
    
    (function(){
      var bp = document.createElement('script');
      var curProtocol = window.location.protocol.split(':')[0];
      if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
      }
      else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
      }
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(bp, s);
    })();

    
    $.ajaxSetup({
      headers: {
        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
      }
    });
  </script>

  <link id="layuicss-layer" rel="stylesheet" href="./fabiao_files/layer.css" media="all"></head>
<body style="">

  <div class="fly-header layui-bg-black">
    <div class="layui-container">
        <a class="fly-logo" href="https://www.freees.cn/">
            <img src="./fabiao_files/logo.png">
        </a>
        <ul class="layui-nav fly-nav layui-hide-xs">
            <li class="layui-nav-item layui-this">
                <a href="https://www.aliyun.com/minisite/goods?userCode=0cxpuaw8" target="_blank"><i class="iconfont icon-iconmingxinganli"></i>阿里云</a>
            </li>
            <li class="layui-nav-item">
                <a target="_blank" href="https://url.cn/5kWvkCx"><i class="iconfont icon-jiaoliu"></i>腾讯云</a>
            </li>
        <span class="layui-nav-bar" style="width: 0px; left: 0px; opacity: 0;"></span></ul>

        <ul class="layui-nav fly-nav-user">
                                <li class="layui-nav-item">
                        <a class="fly-nav-avatar" href="javascript:void(0)">
                            <cite class="layui-hide-xs">longbianbian</cite>
                            <i class="iconfont icon-renzheng layui-hide-xs"></i>
                            <img src="./fabiao_files/default_face_img4.png">
                        <span class="layui-nav-more"></span></a>
                        <dl class="layui-nav-child" id="user_setting">
                            <dd><a href="https://www.freees.cn/user_home?user_no=U5e199d3876659cfcf9"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;"></i>我的主页</a></dd>
                            <dd><a href="https://www.freees.cn/check_email"><i class="layui-icon">စ</i>邮箱激活</a></dd>
                            <dd><a href="https://www.freees.cn/my_article"><i class="layui-icon"></i>我的贴子</a></dd>
                            <dd><a href="https://www.freees.cn/set"><i class="layui-icon"></i>基本设置</a></dd>
                            <hr style="margin: 5px 0;">
                            <dd><a href="https://www.freees.cn/logout" style="text-align: center;">退出</a></dd>
                        </dl>
                    </li>
                <span class="layui-nav-bar"></span></ul>
    </div>
</div>
  <div class="layui-container fly-marginTop">
  <div class="fly-panel" pad20="" style="padding-top: 5px;">
    <div class="layui-form layui-form-pane">
      <div class="layui-tab layui-tab-brief" lay-filter="user">
        <ul class="layui-tab-title">
          <li class="layui-this">发表新帖</li>
        </ul>
        <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
          <div class="layui-tab-item layui-show">
            <form action="https://www.freees.cn/add_article" method="post">
              <div class="layui-row layui-col-space15 layui-form-item">
                <div class="layui-col-md3">
                  <label class="layui-form-label">所在专栏</label>
                  <div class="layui-input-block">
                    <select lay-verify="required" id="nav_id" name="nav_id" lay-filter="column" lay-search="">
                      <option value="">选择或搜索</option>
                                            <option value="1">PHP</option>
                                            <option value="2">JAVA</option>
                                            <option value="3">GO</option>
                                            <option value="4">Linux</option>
                                            <option value="5">前端</option>
                                            <option value="6">数据库</option>
                                            <option value="7">其他</option>
                                            <option value="8">建议</option>
                                          </select><div class="layui-form-select"><div class="layui-select-title"><input type="text" placeholder="选择或搜索" value="" class="layui-input"><i class="layui-edge"></i></div><dl class="layui-anim layui-anim-upbit"><dd lay-value="" class="layui-select-tips">选择或搜索</dd><dd lay-value="1" class="">PHP</dd><dd lay-value="2" class="">JAVA</dd><dd lay-value="3" class="">GO</dd><dd lay-value="4" class="">Linux</dd><dd lay-value="5" class="">前端</dd><dd lay-value="6" class="">数据库</dd><dd lay-value="7" class="">其他</dd><dd lay-value="8" class="">建议</dd></dl></div>
                  </div>
                </div>
                <div class="layui-col-md9">

                  <div class="layui-input-block">
                    <input type="text" id="title" name="title" required="" lay-verify="required" autocomplete="off" class="layui-input">
                  </div>
                </div>
              </div>
              <div class="layui-form-item layui-form-text">
                <div class="layui-input-block">
                  <textarea id="content" name="content" lay-verify="content" placeholder="详细描述" class="layui-textarea fly-editor layui-hide" style="height: 260px;display: none"></textarea><div class="layui-layedit"><div class="layui-unselect layui-layedit-tool"><i class="layui-icon layedit-tool-code" title="插入代码" layedit-event="code"></i><i class="layui-icon layedit-tool-image" title="图片" layedit-event="image"><input type="file" name="file"></i><i class="layui-icon layedit-tool-b" title="加粗" lay-command="Bold" layedit-event="b" ></i><i class="layui-icon layedit-tool-left" title="左对齐" lay-command="justifyLeft" layedit-event="left"></i><i class="layui-icon layedit-tool-center" title="居中对齐" lay-command="justifyCenter" layedit-event="center" ></i><i class="layui-icon layedit-tool-right" title="右对齐" lay-command="justifyRight" layedit-event="right" ></i><i class="layui-icon layedit-tool-link" title="插入链接" layedit-event="link" ></i><i class="layui-icon layedit-tool-face" title="表情" layedit-event="face" ></i></div><div class="layui-layedit-iframe"><iframe id="LAY_layedit_1" name="LAY_layedit_1" textarea="content" frameborder="0" style="height: 280px;" src="./fabiao_files/saved_resource.html"></iframe></div></div>
                </div>
              </div>
              <div class="layui-form-item">
                <div class="layui-input-inline">
                  <input type="text" id="captcha" name="captcha" required="" lay-verify="required" placeholder="请回答后面的问题" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid" style="padding: 0!important;">
<!--
                  <img src="./fabiao_files/math" onclick="this.src=&#39;https://www.freees.cn/captcha/math?ihbI0Imx&#39;+Math.random()">
-->
                </div>
              </div>
              <div class="layui-form-item">
                <button class="layui-btn" lay-filter="add" lay-submit="">立即发布</button>
              </div>
            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<script>
  layui.use('layedit', function(){
    var layedit = layui.layedit,
        form = layui.form;
    layedit.set({
      uploadImage: {
        url: 'https://www.freees.cn/upload_image' //接口url
        ,type: 'post' //默认post
      }
    });
    var index = layedit.build('content',{
      tool: [
        'code' //插入代码
        ,'image' //插入图片
        ,'strong' //加粗
        ,'left' //左对齐
        ,'center' //居中对齐
        ,'right' //右对齐
        ,'link' //超链接
        ,'face' //表情

      ]
    }); //建立编辑器
    //将富文本内容同步到表单,否则无法获取
    form.verify({
      content:function () {
        return layedit.sync(index);
      }
    });
    form.on('submit(add)', function(data){
      data.field['text'] = layedit.getText(index);
      data.field['content'] = layedit.getContent(index);
      $.post("https://www.freees.cn/add_article",data.field,function(res){
        if(res.code == '1'){
          layer.msg(res.msg, {icon: 1},function () {
              window.location.href='https://www.freees.cn/index';
          });
        }else if(res.code == '2'){
          layer.msg(res.msg, function () {
            //window.location.reload();
          });
        }
      },'json');
      return false;
    });
  });
</script>

  <div class="fly-footer">
    <p><a href="https://www.freees.cn/add_article#">Free社区</a> 2019 © <a href="https://www.freees.cn/add_article#" target="_blank">freees.cn 出品</a>
    <a href="http://beian.miit.gov.cn/" target="_blank" rel="nofollow">苏ICP备19038100号-1</a></p>
</div>


</body></html>